package xyz.schwi.cels.entity;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author schwi
 * @date 2021/10/04 23:44
 */
@Data
@NoArgsConstructor
public class ErrorVocabulary extends Vocabulary {
    private Integer errorTime;

    public ErrorVocabulary(Base base, Integer errorTime) {
        super(base.getEn(), base.getCn(), ((Vocabulary) base).getAbbr());
        this.errorTime = errorTime;
    }

    public ErrorVocabulary(String en, List<String> cn, String abbr, Integer errorTime) {
        super(en, cn, abbr);
        this.errorTime = errorTime;
    }

    @Override
    public String save() {
        return super.save() + "#" + errorTime;
    }

    @Override
    public String toString() {
        return super.toString();
    }
}
